package entity;

/**
 * 图书类
 */
public class Book {
    /**
     * 图书名称
     */
    private String bookName;
    /**
     * 图书作者
     */
    private String author;
    /**
     * 图书单价
     */
    private double price;
    /**
     * 图书类型
     */
    private String type;

    /**
     * 构造函数
     * @param bookName
     * @param author
     * @param price
     * @param type
     */
    public Book(String bookName, String author, double price, String type) {
        this.bookName = bookName;
        this.author = author;
        this.price = price;
        this.type = type;
    }

    public String getBookName() {
        return bookName;
    }

    public String getAuthor() {
        return author;
    }

    public double getPrice() {
        return price;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    @Override
    public String toString() {
        return "Book{" +
                "bookName='" + bookName + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                '}';
    }
}
